package com.chen.im.page;

import com.chen.common.FX;
import com.chen.im.view.ChatEdit;

import org.springframework.beans.factory.annotation.Autowired;

import java.io.IOException;

import de.felixroske.jfxsupport.FXMLController;
import javafx.fxml.FXML;
import javafx.scene.layout.GridPane;

/**
 * @Description
 * @Author Pengwei
 * @CreatDate 2021/11/14 11:31
 */
@FXMLController
public class MainPage {

    @Autowired
    ChatEdit chatEdit;

    @FXML
    private GridPane toolBarPane;

    @FXML
    private GridPane chatEditPane;

    @FXML
    private GridPane contactsListPane;
    @FXML
    private GridPane chatListPane;


    @FXML
    public void initialize() throws IOException {
        ////初始化联系人
        contactsListPane.getChildren().add(FX.getFXMLLoader("/view/ContactsList.fxml").load());
        ////初始化toolbar
        toolBarPane.getChildren().add(FX.getFXMLLoader("/view/ToolBar.fxml").load());
        //初始化charedit
        chatEditPane.getChildren().add(FX.getFXMLLoader("/view/ChatEdit.fxml").load());
        ////初始化charList
        chatListPane.getChildren().add(FX.getFXMLLoader("/view/ChatList.fxml").load());
    }
}
